package cn.tedu.service.port;

import cn.tedu.entity.Order;
import cn.tedu.entity.OrderItem;
import cn.tedu.service.ex.OrderCreationExcption;

import java.util.List;

public interface OrderService {

    /**
     * 创建订单
     * @param order         订单记录信息对象
     * @param orderItems    订单商品对象
     * @throws OrderCreationExcption    自定义商品异常抛出则执行事物回滚
     */
    void createOrder(Order order, List<OrderItem> orderItems)throws OrderCreationExcption;
}
